package com.nasarius.bank.scorecard.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.nasarius.bank.scorecard.dao.UploadLogDAO;
import com.nasarius.bank.scorecard.domain.UploadLog;
import com.nasarius.bank.scorecard.domain.UploadLogExample;
@Repository
public class UploadLogDAOImpl extends SqlMapClientDaoSupport implements UploadLogDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
	@Autowired	
    public UploadLogDAOImpl(/*@Qualifier("sqlMapClient")*/SqlMapClient sqlMapClient) {
        super();
        setSqlMapClient(sqlMapClient);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    public int countUploadLogByExample(UploadLogExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("upload_log.ibatorgenerated_countByExample", example);
        return count;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    public int deleteUploadLogByExample(UploadLogExample example) {
        int rows = getSqlMapClientTemplate().delete("upload_log.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    public void insertUploadLog(UploadLog record) {
        getSqlMapClientTemplate().insert("upload_log.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    public void insertUploadLogSelective(UploadLog record) {
        getSqlMapClientTemplate().insert("upload_log.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    @SuppressWarnings("unchecked")
    public List<UploadLog> selectUploadLogByExample(UploadLogExample example) {
        List<UploadLog> list = getSqlMapClientTemplate().queryForList("upload_log.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    public int updateUploadLogByExampleSelective(UploadLog record, UploadLogExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("upload_log.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    public int updateUploadLogByExample(UploadLog record, UploadLogExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("upload_log.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table upload_log
     *
     * @ibatorgenerated Mon Mar 21 00:15:27 IST 2011
     */
    private static class UpdateByExampleParms extends UploadLogExample {
        private Object record;

        public UpdateByExampleParms(Object record, UploadLogExample example) {
            super(example);
            this.record = record;
        }

        @SuppressWarnings("unused")
		public Object getRecord() {
            return record;
        }
    }
    
    @SuppressWarnings("unchecked")
	public List<UploadLog> selectAllUploadLogs() {
		 List<UploadLog> list = getSqlMapClientTemplate().queryForList("upload_log.ibatorgenerated_selectAll");
	        return list;
	}
}